<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>借阅排行榜</title>
    <link rel="stylesheet" type="text/css" href="preview/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="preview/css/weChat.css" />
</head>

<body>
<div class="serviceTime">
    <div class="wrap box_border">
        <div class="title">微信公众号</div>
        <div class="clearfix" style="height: 2.75rem;">
            <div class="wrapContent fl">
                <div>微信粉丝量：<span class="fenSi">456289</span></div>
                <div>微信访问量：<span class="fangWei">896523</span></div>
            </div>
            <div class="code fr"><img src="preview/img/QR-code.png" alt="" width="100%" height="100%"/></div>


        </div>

    </div>
</div>
</body>
<script src="preview/js/jquery.min.js"></script>
<script src="preview/js/rem.js"></script>
<script src="preview/js/countUp.js"></script>
<script>
    var fenSi=456289,
        fangWei=896523,
        timer=null,
        waitCountNum= 0,
        waitLoopTime=15;
    window.onresize = function() {
        getRem(100, 600);
    };
    window.onload = function() {
        getRem(100, 600);

        /////第一种动效方式
        new CountUp($(".fenSi"), 0, fenSi, 0, 3).start();
        new CountUp($(".fangWei"), 0, fangWei, 0, 3).start();
        function waitTime(){
            if(!!window.timer){
                cancelAnimationFrame(window.timer);
            }
            if(waitCountNum >= (waitLoopTime*60)){///15秒重复一次动效
                waitCountNum = 0;
                new CountUp($(".fenSi"), 0, fenSi, 0, 3).start();
                new CountUp($(".fangWei"), 0, fangWei, 0, 3).start();
            }
            waitCountNum++;
            window.timer = requestAnimationFrame(waitTime);
        }
        waitTime();///调用
        ////第一种动效方式结束



        ////第二种动效方式
//        function loopMove(){
//            clearTimeout(timer);
//            new CountUp($(".fenSi"), 0, fenSi, 0, 3).start();
//            new CountUp($(".fangWei"), 0, fangWei, 0, 3).start();
//            timer= setTimeout(loopMove,15000);///15秒执行一次
//        }
//        loopMove();///调用
        ////第二种动效方式结束


    }

</script>
<script type="text/javascript">
</script>

</html>